package com.ala4.oxcafe.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 后台首页信息
 *
 * @author PING
 * @version 1.0.0
 * @date 2025/8/18 11:33
 */
@Data
public class BackendHomeDTO {

    @Schema(description = "服务单数量-今天")
    private Long serviceOrderCount;

    @Schema(description = "车衣施工数量-今天")
    private Long productOrderCount;

    @Schema(description = "访问人数-今天")
    private Long visitorCount;

    @Schema(description = "门店数量")
    private Long storeCount;

    @Schema(description = "本月产品施工数量(按照系列分组)")
    private List<MonthProductDTO> moomProductList;

    @Schema(description = "最近六个月产品施工数量")
    private List<SixMonthProduct> sixMonthProductCount;

    @Data
    public static class MonthProductDTO {

        @Schema(description = "系列")
        private String series;

        @Schema(description = "系列施工数量")
        private Integer seriesCount;

        @Schema(description = "占比")
        private BigDecimal ratio;
    }

    @Data
    public static class SixMonthProduct {

        @Schema(description = "月份")
        private String monthStr;

        @Schema(description = "数量")
        private BigDecimal number;

        public SixMonthProduct() {
        }

        public SixMonthProduct(String monthStr, BigDecimal number) {
            this.monthStr = monthStr;
            this.number = number;
        }
    }

}
